Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates login/profile/preference loading flows to improve error messaging when preferences can’t be fetched (not logged in / forbidden / missing), addressing SolidOS issue #464 about confusing “Unable to fetch your preferences” logs.
Changes:
- Added a
formatDynamicError()helper to produce more informative, contextual error strings. - Updated
ensureLoadedPreferences()to short-circuit when not logged in and to persist clearerpreferencesFileErrormessages for several failure modes (including 404). - Updated
ensureLoadedProfile()andgetUserRoles()to use the formatted error messaging and reduce noisy stack traces.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@bourgeoa what is your opinion on this: should a pref file be created? |
|
@timea-solid @SharonStrats Creating a preferences file needs to add a triple in WebID and reference the typeIndex files in the preferences file. This process is not an owner choice. The owner refusal is not stored and he will be asked again and again. |
|
@bourgeoa I found this for the prefs.ttl file https://github.com/nodeSolidServer/node-solid-server/blob/2caddca5204be89dc434094a08f0f146a61b2efd/default-templates/new-account/settings/prefs.ttl#L4 Do I assume that if they don't have a preferences file that they also don't have public and private type index? Or do I also need to look for these and create them if they don't exist? If they do exist write those paths in the prefs.ttl file. I had a go at creating the file and adding the row to webID in this PR, but I didn't look for or create the public/private indexes yet. |
Ticket #464
I followed the note from Tim in the meeting notes. Instead of offering to create the preference file I just improved the messaging. After reading again I thought I should also implement offering to create the pref file.
Let me know what you think. I can change it.